package net.zrnecko.km.test;

import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

import net.zrnecko.km.client.PersistenceService;
import net.zrnecko.km.server.PersistenceServiceImpl;

import org.dozer.DozerBeanMapper;
import org.dozer.Mapper;

import com.google.inject.AbstractModule;

public class DataStoreTestModule extends AbstractModule {

	@Override
	protected void configure() {
		bind(PersistenceService.class).to(PersistenceServiceImpl.class);
		bind(EntityManagerFactory.class)
				.toInstance(
						Persistence
								.createEntityManagerFactory("transactions-optional"));
		
		bind(Mapper.class)
				.toInstance(new DozerBeanMapper());
		

	}

}
